//
//  TYCustomConfig.h
//  TuyaSmartPublic
//
//  Created by 高森 on 2016/10/25.
//  Copyright © 2016年 Tuya. All rights reserved.
//

//#import <TYFoundationKit/TYFoundationKit.h>
#import <YYModel/YYModel.h>

@interface TYCustomConfig : NSObject <YYModel>

+ (instancetype)sharedInstance;

@property (nonatomic, strong) NSString  *bundleId;

@property (nonatomic, assign) BOOL      appDebug;

//检测到root或者越狱后是否强制退出app
@property (nonatomic, assign) BOOL      rootExitApp;

//公版版本号
@property (nonatomic, strong) NSString  *sourceVersion;

//跳转协议
@property (nonatomic, strong) NSString  *appScheme;

//关于涂鸦智能
@property (nonatomic, assign) BOOL      needAboutTuya;

//扫一扫
@property (nonatomic, assign) BOOL      needQRCode;

//手势密码
@property (nonatomic, assign) BOOL      needGesturePassword;

//智能场景
@property (nonatomic, assign) BOOL      needScene;

//地理围栏
@property (nonatomic, assign) BOOL      is_geofence_support;

//自建 Hybrid 商城
@property (nonatomic, assign) BOOL      needMall;
//自建商城首页 url
@property (nonatomic, strong) NSString *mallIndexUrl;
//自建商城订单页 url
@property (nonatomic, strong) NSString *mallOrdersUrl;

@property (nonatomic, strong) NSString *speakerScheme;

// UI 配置化
@property (nonatomic, strong) NSDictionary *themeConfigurationDic;

//是否显示天气组件
@property (nonatomic, assign) BOOL      isDashboardEnable;

//-------------登录相关--------------
//登录页风格 //1 透明风格 //2 灰色风格
@property (nonatomic, strong) NSString *loginStyle;

// 支持手机号注册的国家码列表
@property (nonatomic, strong) NSArray *supportMobileRegisterCountryCodes;

// 支持体验模式
@property (nonatomic, assign) BOOL supportAnonymous;

//---------------------------------


//是否显示首页智能场景
@property (nonatomic, assign) BOOL      showIndexScene;

//------------插件相关------------
@property (nonatomic, strong) NSString  *appGroupName;

@property (nonatomic, assign) BOOL  needWidget;

//------------------------------

//------------配网相关(deprecated)------------
//热点模式
@property (nonatomic, assign) BOOL      needAPMode;

//ap热点前缀
@property (nonatomic, strong) NSArray   *apSsidPrefixs;

//配网列表类型：zigbee_dev-新配网列表，all_dev-旧配网列表，其他-国内新列表，国外旧列表
@property (nonatomic, strong) NSString  *networkConfigMode;

@property (nonatomic, assign) BOOL isShowSearch; ///< 手动配网是否展示搜索框 0 - 不展示；1 - 展示
//------------------------------


//------------AppKey------------
//涂鸦
@property (nonatomic, assign) NSInteger appId;
@property (nonatomic, strong) NSString  *tyAppKey;
@property (nonatomic, strong) NSString  *tyAppSecret;
@property (nonatomic, strong) NSString  *tyDailyAppKey;
@property (nonatomic, strong) NSString  *tyDailyAppSecret;

//qq
@property (nonatomic, strong) NSString  *qqAppKey;
@property (nonatomic, strong) NSString  *qqAppSecret;

//微信
@property (nonatomic, strong) NSString  *wxAppKey;
@property (nonatomic, strong) NSString  *wxAppSecret;

//微博
@property (nonatomic, strong) NSString  *wbAppKey;
@property (nonatomic, strong) NSString  *wbAppSecret;

//facebook
@property (nonatomic, strong) NSString  *fbAppKey;
@property (nonatomic, strong) NSString  *fbAppSecret;

//twitter
@property (nonatomic, strong) NSString  *twAppKey;
@property (nonatomic, strong) NSString  *twAppSecret;

//讯飞
@property (nonatomic, strong) NSString *iflyAppKey;

//Google
@property (nonatomic, strong) NSString *googleAppKey;
@property (nonatomic, strong) NSString *googleAppSecret;

@property (nonatomic, strong) NSString *ggAppKey; // speech_google_appkey_ios
@property (nonatomic, copy)   NSString *ggClinetId; // Google Flip client id

//QQ音乐
@property (nonatomic, strong) NSString *qqMusicAppKey;
@property (nonatomic, strong) NSString *qqMusicAppSecret;
//------------------------------

//是否使用第三方登录
@property (nonatomic, assign) BOOL      needThirdLogin;

//FAQ
@property (nonatomic, assign) BOOL      needFAQ;

//隐私政策
@property (nonatomic, assign) BOOL      needPrivacy;
@property (nonatomic, strong) NSString  *rightUrl;
@property (nonatomic, strong) NSString  *factoryInfoUrl;

// 开源组件协议
@property (nonatomic, assign) BOOL      need_open_source;

//服务协议
@property (nonatomic, assign) BOOL      needService;

//版权
@property (nonatomic, strong) NSString  *companyName;

//语音识别
@property (nonatomic, assign) BOOL      needSpeechRecognition;

@property (nonatomic, assign) BOOL      needBle;/// < 是否需要单点蓝牙
@property (nonatomic, assign) BOOL      needBleMesh;

@property (nonatomic, assign) BOOL      needHomeKit; /// < homeKit支持

@property (nonatomic, assign) BOOL      needEZ; /// < 是否支持EZ,免密配网

@property (nonatomic, assign) BOOL      use_ssl_pinning;

@property (nonatomic, assign) BOOL      is_shared_gateway_subdevice_addable;

@property (nonatomic, assign) BOOL      is_security_support;

@property (nonatomic, assign) BOOL      is_energy_support;

@property (nonatomic, assign) BOOL      is_open_home_device_discover;

// Alexa授权页面是否显示使用其他账户
@property (nonatomic, assign) BOOL      is_show_alexa_oem_account;

// 密码强度配置
@property (nonatomic, strong) NSString  *user_password_regular;

// 设备网络
@property (nonatomic, assign) BOOL      open_device_network;

// 登录前可用区
@property (nonatomic, strong) NSDictionary *userRegion;

//----------审核模式相关----------
// 审核模版选择(1~n)
@property (nonatomic, strong) NSString  *reviewTemplate;
// 审核账号
@property (nonatomic, strong) NSString  *reviewAccount;
// 审核失效时间，例如20190717，表示北京时间2019年7月17日之前（含）
@property (nonatomic, strong) NSString  *reviewEndDate;
// 是否隐藏登录欢迎页
@property (nonatomic, assign) BOOL      hideLoginGuidePage;
// 是否进入审核模式
- (BOOL)inAppleReviewMode;
// RN审核模版jsbundle的sha1摘要值
@property (nonatomic, strong) NSString *rnReviewSha1;
//------------------------------

@property (nonatomic, strong) NSDictionary *rawConfig;

// 关闭扫描配网的功能，默认为true
@property (nonatomic, assign) BOOL scanDeviceClose;

//------------IPC 相关------------
// 单鱼眼 SDK 初始化参数
@property (nonatomic, copy) NSString *singleHalfFisheyeSDKKey;
// 单鱼眼 SDK 初始化参数(企业包)
@property (nonatomic, copy) NSString *singleHalfFisheyeSDKEnterprisekey;

// 多屏预览时，截图和视频录制保存在系统相册还是 App 相册。 1 App 相册，2 系统相册，默认 1
@property (nonatomic, strong) NSString *photoSavePathForMultiPlay;

// git commit hash (long)
@property (nonatomic, strong) NSString *gitCommitHash;

// 多语言标识
@property (nonatomic, strong) NSString *languageBucket;

/// 使用IAP支付，否则使用三方支付
@property (nonatomic, assign) BOOL isIAP;

/// 是否支持微信账号绑定
@property (nonatomic, assign) BOOL isBindWechat;

/// 是否会灰度包
@property (nonatomic, assign) BOOL isTestFlight;

// 是否为涂鸦智能App
- (BOOL)isTuyaApp;

// 是否为智能生活App
- (BOOL)isSmartLifeApp;

// 是否为企业包
- (BOOL)isEnterpriseApp;

// 获取App的权限Dictionary，从entitlements.plist中读取
- (NSDictionary *)getAppEntitlements;

// 动态配置通过此方法与本地配置合并
- (void)updateConfig:(NSDictionary *)config;

// 更新多语言相关配置，切换多语言后需要更新
- (void)updateLanguageConfig;

@end
